package org.schhx.session;

import java.util.List;

/**
 * @author shanchao
 * @date 2021/1/30
 */
public interface SqlSession {

    <T> T getMapper(Class<T> type);

    <T> T selectOne(String statement) throws Exception;

    <T> T selectOne(String statement, Object parameter) throws Exception;

    <E> List<E> selectList(String statement) throws Exception;

    <E> List<E> selectList(String statement, Object parameter) throws Exception;

    int insert(String statement) throws Exception;

    int insert(String statement, Object parameter) throws Exception;

    int update(String statement) throws Exception;

    int update(String statement, Object parameter) throws Exception;

    int delete(String statement) throws Exception;

    int delete(String statement, Object parameter) throws Exception;
}
